package com.hikvision.rpq.sblearn.service;

import com.hikvision.rpq.sblearn.annoition.Metrics;
import com.hikvision.rpq.sblearn.common.BusinessErrorCode;
import com.hikvision.rpq.sblearn.entity.User;
import com.hikvision.rpq.sblearn.exception.BusinessException;
import com.hikvision.rpq.sblearn.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author renpeiqian
 * @date 2021/9/15 11:42
 * @since
 */
@Service
public class UserService {

    @Autowired
    UserRepository userRepository;


    //@Transactional
    public void saveUser(User user) {

        userRepository.save(user);
        int i =1/0;
    }
}
